-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-18559: Cleanup FinalizedFeatures #18593
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frankvicky thanks for this patch. please take a look at one small comment.
this.metadataVersion = metadataVersion; | ||
this.finalizedFeatures = new HashMap<>(finalizedFeatures); | ||
this.finalizedFeaturesEpoch = finalizedFeaturesEpoch; | ||
// In KRaft mode, we always include the metadata version in the features map. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please keep the comment "In KRaft mode, we always include the metadata version in the features map"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
To avoid confusion, I delete the in kraft
.
826cc54
to
0f7db63
Compare
) { | ||
Objects.requireNonNull(metadataVersion); | ||
this.metadataVersion = metadataVersion; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please merge them?
this.metadataVersion = Objects.requireNonNull(metadataVersion);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
I have just updated the patch
b7a6b06
to
a7c06fe
Compare
} else { | ||
this.finalizedFeatures.remove(MetadataVersion.FEATURE_NAME); | ||
} | ||
// Intentionally include metadata version in features map for version consistency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is a bit confusing to me - what are we trying to say?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ijuma,
Thanks for the review.
Previously, I simply deleted // In KRaft mode
from the comment, but I realized this could be confusing. Then I tried rephrasing it, but it seems even more confusing now. 😓
I'm wondering if we should delete the entire comment instead?
The original comment was to highlight the difference between zk and kraft behavior. Now that zk is gone, do we still need this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to revisit all callers to double-check if this is still a requirement.
a7c06fe
to
2ebd404
Compare
JIRA: KAFKA-18559 Cleanup the zk logic and test in `FinalizedFeatures`
2ebd404
to
cafd9b9
Compare
the failed test is traced by https://issues.apache.org/jira/browse/KAFKA-18441 |
Reviewers: Ismael Juma <[email protected]>, Chia-Ping Tsai <[email protected]>
Reviewers: Ismael Juma <[email protected]>, Chia-Ping Tsai <[email protected]>
JIRA: KAFKA-18559
Cleanup the zk logic and test in
FinalizedFeatures
Committer Checklist (excluded from commit message)